<?python
    from datetime import datetime
    from promogest.Environment import *
?>
<html   xmlns="http://www.w3.org/1999/xhtml"
        xmlns:py="http://genshi.edgewall.org/"
        xmlns:xi="http://www.w3.org/2001/XInclude"
        lang="en">
    <head>
        <title>Report Agenti</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <xi:include href="style.css"><xi:fallback/></xi:include>
    </head>
    <body>
        <table cellpadding="0" cellspacing="3" border="0">
            <tr>
                <th>Fornitore</th>
                <th>Articolo</th>
                <th>Data forn.</th>
                <th>Data prezzo</th>
                <th>Prezzo lordo</th>
                <th>Prezzo netto</th>
                <th>IVA (%)</th>
            </tr>
            <tr class="row" py:for="dao in objects">
                <td class="detail">${dao.fornitore}</td>
                <td class="detail">${dao.articolo}</td>
                <td class="detail" py:if="dao.data_fornitura is not None">${dao.data_fornitura.strftime('%d/%m/%Y')}</td>
                <td class="detail" py:if="dao.data_fornitura is None">-</td>
                <td class="detail">${dao.data_prezzo.strftime('%d/%m/%Y')}</td>
                <td class="detail" py:if="dao.data_prezzo is None">-</td>
                <td class="detail">${'%14.2f' % float(dao.prezzo_lordo or 0.0)}</td>
                <td class="detail">${'%14.2f' % float(dao.prezzo_netto or 0.0)}</td>
                <td class="detail">${'%14.2f' % float(dao.percentuale_iva or 0.0)}</td>
            </tr>
        </table>
    </body>
</html>